<div class="panel panel-default">
	<div class="panel-heading">
	<?php
		$this->widget('system.zii.widgets.CBreadcrumbs',array(
				'links'=>array(
					'后台管理',
					'添加单页'
					)
			));
	?>
	</div>
	<div class="panel-body">
	<?php if($model->hasErrors()): ?>
		<div class="alert alert-danger">
			<?php echo CHtml::errorSummary($model); ?>
		</div>
	<?php endif; ?>
	<p class="text-right">
		<a class="btn btn-primary" href="<?php echo $this->createUrl('pages/list'); ?>" >查看单页列表</a>
	</p>
		<?php $form = $this->beginWidget('CActiveForm', array(
			'htmlOptions'=>array(
					'class'=>'form-horizontal'
				)
		)) ?>
			<div class="form-group">
				<?php
					echo $form->labelEx($model, 'title', array('class'=>'col-sm-2 control-label'));
				?>
				<div class="col-sm-4">
					<?php 
						echo $form->textField($model, 'title', array('class'=>'form-control'));
					?>
				</div>
			</div>
			<div class="form-group">
				<?php echo $form->labelEx($model, 'keywords', array('class'=>'col-sm-2 control-label')); ?>
				<div class="col-sm-8">
					<?php 
						echo $form->textField($model, 'keywords', array('class'=>'form-control'));
					?>
				</div>
			</div>
			<div class="form-group">
				<?php 
					echo $form->labelEx($model, 'description', array('class'=>'col-sm-2 control-label'));
				?>
				<div class="col-sm-8">
				<?php 
					echo $form->textArea($model, 'description', array('class'=>'form-control'));
				?>
				</div>
			</div>
			<div class="form-group">
				<?php 
					echo $form->labelEx($model, 'content', array('class'=>'col-sm-2 control-label'));
				?>
				<div class="col-sm-8">
					<?php 
						echo $form->textArea($model, 'content', array('id'=>'editor', 'style'=>'height:300px;'));
					?>
				</div>
				<script>
					var ue = UE.getEditor('editor');
				</script>
			</div>
			<div class="form-group">
				<?php 
					echo $form->labelEx($model, 'name', array('class'=>'col-sm-2 control-label'));
				?>
				<div class="col-sm-2">
					<?php 
						echo $form->textField($model, 'name', array('class'=>'form-control'));
					?>
				</div>
				<div class="col-sm-4">
					(用于访问识别)
				</div>
			</div>
			<div class="form-group">
				<?php 
					echo $form->labelEx($model, 'template', array('class'=>'col-sm-2 control-label'));
				?>
				<div class="col-sm-2">
					<?php 
						echo $form->textField($model, 'template', array('value'=>'page.php', 'class'=>'form-control'));
					?>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 col-sm-offset-2">
					<input type="submit" value="提交" class="btn btn-default" />
				</div>
			</div>
		<?php 
			$this->endWidget();
		?>
	</div>
</div>
